home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-05-09 | 3.9 KB | 136 lines | [TEXT/KAHL] |
- // wild.h wildcard AppleScript addition
- //
- // 93/11/17 File created
- // 93/12/08 *** released Wild 0.1.0 ***
- // 93/12/09 moved common files to the THINK C Folder
- // 94/01/24 *** released Wild 1.0.0 ***
- // 94/05/09 Totally removed the licensing mechanism and added the GNU comments
- //
- //--------------------------------------------------------------------------------------------------
- // Copyright © 1993, 1994 by Rainbow Hill Pty Ltd.
- //
- // This program is free software; you can redistribute it and/or modify it under the terms of
- // the GNU General Public License as published by the Free Software Foundation; either version 2
- // of the License, or any later version.
- //
- // This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
- // without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- // See the GNU General Public License for more details.
- //
- // You should have received a copy of the GNU General Public License along with this program;
- // if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- //
- #pragma once
-
- #include <AppleEvents.h>
- #include <AERegistry.h>
-
- #define WILD_name "Wild"
- #define WILD_bufferLength 256
- #define WILD_nameLength 64
- #define WILD_maxFilenameLen 31
-
- //
- // resource related constants *** must agree with resource IDs in wild.π.rsrc ***
- //
- #define WILD_genericDialogRsrc 128 // ALRT (and DITL)
- #define WILD_dlogRsrc 129 // DLOG (and DITL)
- enum {
- WILD_dlogIconNo = 1,
- WILD_dlogOkNo = 2,
- WILD_dlogStopNo = 3,
- WILD_dlogRestoreNo = 4,
- WILD_dlogDefaultNo = 5,
- WILD_dlogDoCreatorNo = 6,
- WILD_dlogCreatorNo = 7,
- WILD_dlogDoTypeNo = 8,
- WILD_dlogTypeNo = 9,
- WILD_dlogDoLongNo = 10,
- WILD_dlogLongNo = 11,
- WILD_dlogDoShortNo = 12,
- WILD_dlogShortNo = 13,
- WILD_dlogFilesNo = 14,
- WILD_dlogFoldersNo = 15,
- WILD_dlogCaseNo = 16,
- WILD_dlogOnlyNameNo = 17,
- WILD_dlogOnlyNo = 18,
- WILD_dlogCopyrightNo = 19,
-
- WILD_dlogItemArraySize
- };
- #define WILD_errMessRsrc 128 // STR# error messages
- enum {
- WILD_wrongDataErrStr = 1,
- WILD_noStringErrStr = 2,
- WILD_dirParDataErrStr = 3,
- WILD_nothingErrStr = 4,
- WILD_badWildErrStr = 5,
- WILD_notFoundErrStr = 6
- };
- #define WILD_parmNamesRsrc 129 // STR# parameter names
- enum {
- WILD_longName = 1,
- WILD_shortName = 2,
- WILD_filesName = 3,
- WILD_foldersName = 4,
- WILD_creatorName = 5,
- WILD_typeName = 6,
- WILD_caseName = 7,
- WILD_dlogName = 8,
- WILD_onlyName = 9
- };
- #define WILD_miscStrRsrc 130 // STR# miscellaneous strings
- enum {
- WILD_itemStr = 1,
- WILD_OSErrStr = 2,
- WILD_copyright = 3
- };
-
- //
- // IDs of paramaters of class 'rh??' *** must agree with IDs of 'aete' in wild.π.rsrc ***
- //
- enum {
- WILD_kAEfiles = ((AEKeyword)'file'),
- WILD_kAEfolders = ((AEKeyword)'fold'),
- WILD_kAEcase = ((AEKeyword)'case'),
- WILD_kAElong = ((AEKeyword)'star'),
- WILD_kAEshort = ((AEKeyword)'mark'),
- WILD_kAEcreator = ((AEKeyword)'ficr'),
- WILD_kAEtype = ((AEKeyword)'fity'),
- WILD_kAEdialog = ((AEKeyword)'dlog'),
- WILD_kAEonly = ((AEKeyword)'only')
- };
-
- // default values for the parameters
- // Note that the default values for 'doCreator' and 'doType' are hardcoded to false.
- enum {
- WILD_filesDef = true,
- WILD_foldersDef = true,
- WILD_caseDef = false,
- WILD_doLongDef = true,
- WILD_doShortDef = true,
- WILD_longDef = '*',
- WILD_shortDef = '?',
- WILD_dialogDef = false
- };
-
- struct wild_parm_struct {
- Boolean files;
- Boolean folders;
- Boolean caseS;
- Boolean doLong;
- Boolean doShort;
- Boolean doCreator;
- Boolean doType;
- Boolean doDialog;
- char longW;
- char shortW;
- OSType creator;
- OSType type;
- char only[WILD_nameLength];
- };
- typedef struct wild_parm_struct wild_parm_t;
-
- // character to fill in creator and file type if less than 4 characters are specified
- #define WILD_defOSchar '\0'
-